﻿CREATE  proc [dbo].[danhmuckhothem]
@makho varchar(255),
@tenkho nvarchar(255),
@loai nvarchar(255),
@ma_tk nvarchar(255)
as
if exists(select * from DM_KHO  Where makho =@makho or ten_kho = @tenkho )
begin
select ErrCode=0
end
else
begin
insert into DM_KHO(makho,ten_kho,loai,ma_tk )values(@makho,@tenkho,@loai,@ma_tk ) 
select ErrCode=1
end
